package com.casework
class Measure {
    String fullMeasureDescription
    String comments
    boolean leadMeasure
    CompetitionConcern competitionConcern
    OriginOfDivestment originOfDivestment
    String term
    PurchaserCriteria purchaserCriteria
    YesNoNA clusterSale
    YesNoNA alternativeRemedy
    YesNoNA additionalRequirements
    ScopeOfDivestment scopeOfDivestment
    YesNoNoData tangibleFixedAsset
    YesNoNoData intangibleFixedAsset
    YesNoNoData currentAsset
    YesNoNoData personnel
    YesNoNoData transitionalService

    MeasureClassification measureClassification

    static belongsTo = [legalCase: LegalCase]

    static searchable = {
        only = ['fullMeasureDescription', 'comments', 'term']
    }

    static mapping = {
        fullMeasureDescription type:'text'
        comments type: 'text'
    }

    static constraints = {
        fullMeasureDescription nullable: true
        leadMeasure nullable: true
        competitionConcern nullable: true
        originOfDivestment nullable: true
        term nullable: true
        purchaserCriteria nullable: true
        clusterSale nullable: true
        alternativeRemedy nullable: true
        additionalRequirements nullable: true
        scopeOfDivestment nullable: true
        tangibleFixedAsset nullable: true
        intangibleFixedAsset nullable: true
        currentAsset nullable: true
        personnel nullable: true
        transitionalService nullable: true
        measureClassification nullable: true
        comments nullable:true
    }

    @Override
    String toString(){
        fullMeasureDescription.encodeAsHTML()
    }
}
